#include "tmsendmsg.h"
#include <QDebug>

TMSendMsg::TMSendMsg(QObject *parent) : QObject(parent)
{

}

void TMSendMsg::slot_sendMsg(QString userName, QString mac, QString strMsg, NetWorkRobot::UserMangerPrx *m_prxUser)
{
    try
    {
        std::string str = (*m_prxUser)->send(userName.toUtf8().toStdString(),mac.toUtf8().toStdString(),strMsg.toUtf8().toStdString());
        qDebug()<<"get reply:"<<QString::fromUtf8(str.c_str());
    }catch(Ice::Exception& e){
        //QMessageBox::warning(this, "ERROR", "send msg failed!", QMessageBox::Yes);
        qDebug()<<"Error:"<<e.what();
    }
    return;

}
